home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
mflzt.exe
/
lha
/
MFLZT.DOC
< prev
next >
Wrap
Text File
|
1989-11-26
|
27KB
|
995 lines
==============================
= MICROFIRM FUNCTION LIBRARY =
= for Zortech C/C++ =
= - by - =
= Bob Stout =
==============================
Functions and Documentation Copyright 1988-89
by Robert B. Stout dba MicroFirm
Portions Copyright 1986-87 by Steven E. Margison
-- All Rights Reserved --
ISBN 0-944267-06-8
--------- TABLE OF CONTENTS ---------
Introduction ................................. 1
The Documentation ............................ 1
Installation ................................. 2
Linking ...................................... 3
Interrupt Handler Functions .................. 4
Utilities .................................... 5
Portability .................................. 9
Shareware .................................... 10
Warranty ..................................... 11
Registration Form ............................ 12
The MicroFirm Function Library for Zortech C/C++
I. INTRODUCTION
The heart of the C language is its library. Each
compiler has its own library of functions, which is complete
only to the degree that the compiler author wishes to make it.
The Zortech C++ Compiler is an excellent product which has
gotten rave reviews in computer magazines. The greatest
criticism which can be leveled at Zortech is the size of its
library. It has all the usual basic functions, plus some nice
unique features. But it still can use some help. Enter the
MicroFirm Library! At over 200 functions my library greatly
enhances program development with Zortech C/C++.
II. THE DOCUMENTATION
The documentation for the library is contained in the
file, MFL_FUNC.MAN, which describes each function. A companion
quick reference, MFL_QREF.DOC, is also provided which briefly
lists the prototypes and functional descriptions for all
lirary functions. Additional documentation includes TKNOTES.DOC,
containing technical notes on the current release, README which
contains miscellaneous information along with changes from
previous versions, and CREDITS wherein the folks who helped make
this library a reality are given proper recognition.
MicroFirm Function Library for Zortech Page 1
III. INSTALLATION
The MicroFirm Function Library is distributed as four library
files for each type of memory model. (Only the full registration
with source has all four libraries.) The filenames are:
MFLZTS.LIB Small Memory Model
MFLZTC.LIB Compact Memory Model
MFLZTM.LIB Medium Memory Model
MFLZTL.LIB Large Memory Model
For the remainder of this manual the libraries will be referred
to as MFLZTx.LIB.
A typical hard disk installation of Zortech will consist of a
directory named \ZORTECH which will be the root directory for
compiler, libraries, and header files. MFLZTx.LIB should be
copied into \ZORTECH\LIB, or into whatever directory the
Zortech libraries have been installed.
The MicroFirm Function Library also includes several header
files which list "define"s for many useful items. These header
files are also required to re-compile the source for the
libraries. The header files should be copied into the
\ZORTECH\INCLUDE directory, or in whatever other directory
contains STDIO.H, DOS.H, and the other header files. If you have
purchased the source files and wish to have them on hard disk,
make a new subdirectory under the \ZORTECH\LIB main directory
called MFL (C:\ZORTECH\LIB\MFL) and copy all source files to
that directory.
MicroFirm Function Library for Zortech Page 2
IV. LINKING
The MFLZTx.LIB library must be linked with any other
libraries whenever a function is used in your program. Some
programs may not use MFLZTx.LIB functions, and therefore the
linking of the library may be eliminated to save time. The
Zortech driver (ZTC) command line would look like this:
ZTC MYPROGRAM \ZORTECH\MFLZTS.LIB
Naturally, if your directory structure is not the standard,
specify the paths as needed. In addition, if you have other
third party libraries, be sure to include them after MFLZTx.LIB.
MicroFirm Function Library for Zortech Page 3
V. INTERRUPT HANDLER FUNCTIONS
A special feature of The MicroFirm Function Library is
the various interrupt handler functions. These are:
ticker
ctlbrk
criterr
These functions provide the programmer with the ability to
install a special routine to intercept one of the DOS
interrupts. ctlbrk() installs a user-defined routine to be
executed whenever a control-break is typed on the keyboard.
criterr() traps the DOS critical error handler (the one that
says Abort, Retry, etc.) and allows the programmer to substitute
his own handler. ticker() is not really a user definable
handler, but a pre-built handler which allows the user to
perform operations relative to the system's clock. A special
variable may be loaded with a value and then tested at
intervals. When the variable has hit zero, a specific amount of
time has passed. The variable counts 18.2 times per second, and
is installed on INT 1CH.
The usage of these interrupt handlers is slightly complex and
interactive. For example, if you use ticker() you must use
ctlbrk() and you may have to use criterr(). It has been said
that a picture is worth a thousand words. Well, to me, a source
file is worth a whole chapter of tutorial. Therefore, refer to
TESTINTS.C, which is supplied with all distributions of The
MicroFirm Function Library, to see a heavily commented source
code file which uses these interrupts. This program may be
compiled and run to watch the result.
MicroFirm Function Library for Zortech Page 4
VI. THE UTILITIES
Included in the self-extracting archive, DEMOS.COM, are
the source code for several utiltiies originally written for the
SMTC library by Steve Margison. Nothing earth shaking here, just